March 25, 2010

This package contains Windows support software for the BioSemi USB based
data acquisition system.  This software uses the 64 bit Microsoft
WinUsb2 kernel mode driver available on Windows7-64 and Vista64.
The Labview_DLL.dll contained herein makes appropriate
user mode calls to this driver to implement the BioSemi acquisition API. 

Windows Installation
====================

When the receiver's USB cable is plugged into the computer's USB
slot, a kernel mode driver must be chosen to handle the I/O.  
On XP32, Vista32 and Win7-32 this driver can be either the BioSemi or
the Microsoft driver.  On Win7-64 and Vista64 the Microsoft driver must be
used.  Here's the usual sequence of displays and what you should
chose.


Vista64, Win7-64
----------------------------------
Open the Control Panel
	Select: Device Manager
Plugin the receiver's USB cable.

If the wrong driver is installed for this device, right click on the
existing driver listed (you may have to expand a class to see the driver
entry in the list), select the "Uninstall" menu item and a "Confirm
Device Uninstall" window will appear.  Select "Delete the driver software
for this device" and click "OK".  Pull out the USB cable and re-insert it.
If there is no existing driver, double click "Add Hardware" in the
Control Panel.

Now you should see the following sequence of displays:

"Windows needs to install driver software for your Receiver01"
	Select "Locate and install driver software (recommended)"

After a short pause while it searches Windows Update you get:

"Insert the disk that came with your RECEIVER01"
	Select "I don't have the disk. Show me other options."

"Windows couldn't find software for your device."
	Select "Browse my computer for driver software (advanced)"

"Browse for driver software on your computer"
	Use "Browse" to select the directory with the INF file to use.

"Windows can't verify the publisher of this driver software"
	Select "Install this driver software anyway"


Testing
=======
Go to the "C-code subdirectory - "USB_drivers_Windows_64bit\Developers_kit\
C-code - and run the program "Labview_DLL_SyncTest" using
this command:

Labview_DLL_SyncTest 0

This program checks that the 0xffffff00 sync words appear in all the
right places in the input stream.  It stops with a message if they don't.

There can be 3 command line parameters for this program:
- ring buffer size, in 512 byte units,
- ring buffer extra bytes beyond the 512 multiple, and
- time to run.
They can be in any order or left out completely.

Ring buffer size must start with a 'b' or 'B' and is given in units
of 512 bytes.  The default if not given is b65536 for 32 Mbytes.

Ring buffer extra bytes must start with a '+' and must be a multiple
of 4 bytes.  The default if not given is +0 for no extra bytes.

The time to run is in seconds.  The default if not given is 600 seconds
(10 minutes).  If given as 0 (as shown above) there will be no time limit.
 
Hitting any key when the program is running will stop the test run.


Labview_DLL.dll Usage Notes
============================

1. On Win7-64 and Vista64 install the 64 bit BioSemiWinUsb2.INF file. 
Then if using 32 bit software (e.g. LabVIEW, which is still 32 bits),
32 bit support software from the 32 bit download kit must be
used (i.e. "USB_drivers_Windows_32bit\Developers_kit\C-code\*").

2. The ring buffer can be any size as long as it is a multiple of 4
bytes.  When the size is a multiple of 512 bytes, the driver/library
will do RAWIO which gives slightly better performance.  Note: the
Linux version supports only multiples of 512 bytes.

3. Some performance improvement may be gained by using the library
parameters explained in the file "Developers_Tuning_Info.txt".
